from typing import TypeVar

from sqlalchemy.orm import Mapped, mapped_column, relationship

from recruit.adapter.database.models.base import AbstractResume

Resume = TypeVar('Resume')


class ResumeContact(AbstractResume):
    """ Model ResumeContact. """
    email: Mapped[str] = mapped_column(nullable=True, comment='E-mail')
    phone: Mapped[str] = mapped_column(nullable=True, comment='Телефон')
    telegram: Mapped[str] = mapped_column(nullable=True, comment='Telegram')
    resume: Mapped['Resume'] = relationship(
        back_populates='resume_contact',
        lazy='selectin'
    )
